<template>
  <div>
    {{ lst }}
    <van-card
    v-for="(i,x) in lst" :key="x"
  :num=i.money
  :price=i.tmoney
  :desc=i.purpose
  :title=i.code
  thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
>
  <template #footer>
    <van-button size="mini">出借</van-button>
  </template>
</van-card>
<van-pagination v-model="page" :total-items="total" :items-per-page="page_size" @change="change"/>
  </div>
</template>

<script>
export default {
    data(){
        return{
            lst:"",
            page:1,
            page_size:2,
            total:0
        }
    },
    methods:{
        change(){
            this.axios.get("/getnew?page="+this.page+"&page_size="+this.page_size)
            .then(res=>{
                this.total=res.data.total
                this.lst=res.data.data

            })
        }
    },
    mounted(){
        this.change()
    }
}
</script>

<style>

</style>